package com.web.hotel.vo.mapper;

import com.web.hotel.vo.HotelVo;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Created by chen on 2017/3/11.
 */
public class HotelVoMapper implements RowMapper<HotelVo> {
    public HotelVo mapRow(ResultSet resultSet, int i) throws SQLException {
        HotelVo hotelVo = new HotelVo();
        hotelVo.setLandmarks(resultSet.getString("landmarks"));
        hotelVo.setAreaName(resultSet.getString("areaName"));
        hotelVo.setCityName(resultSet.getString("cityName"));
        hotelVo.setHotelDesc(resultSet.getString("hotelDesc"));
        hotelVo.setHotelCode(resultSet.getString("hotelCode"));
        hotelVo.setHotelId(resultSet.getInt("hotelId"));
        hotelVo.setHotelImg(resultSet.getString("hotelImg"));
        hotelVo.setHotelName(resultSet.getString("hotelName"));
        hotelVo.setHotelType(resultSet.getString("hotelType"));
        return hotelVo;
    }
}
